
import java.util.*;
public class Notebook
{
	private ArrayList<String> note=new ArrayList<String>();
	public void add(String a)
	{
		note.add(a);
	}
	public int getsize()
	{
		return note.size();
	}
	public void insert(int index,String a)
	{
		note.add(index,a);
	}
	public String getnote(int index)
	{
		return note.get(index);
	}
	public void removenote(int index)
	{
		note.remove(index);
	}
	public String[] list()
	{
		String[]a=new String[note.size()];
		/*for(int i=0;i<note.size();i++)
		{
			a[i]=note.get(i);
		}*/
		note.toArray(a);
		return a;
	}
	public static void main(String[] args)
	{
		Notebook book=new Notebook();
		book.add("第一个");
		book.add("第二个");
		book.add("第三个");
		System.out.println(book.getsize());
		System.out.println(book.list());
		/*System.out.println(book.toString());*/
		book.insert(0,"插入");
		String a[]=book.list();
		for(String s:a){
		System.out.println(s);
		}
	}
}
